package cn.com.nes.site.entity.vo.distribution;

import cn.com.nes.mybatis.agent.distribution.entity.CompanyApply;
import cn.com.nes.site.entity.vo.BaseVO;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 审核 申请的公司
 */
@Data
public class AuditCompanyApplyVo extends BaseVO {

    /**
     * 申请公司表id
     */
    @NotNull(message = "申请公司表id")
    private Long id;

    /**
     * 审核状态：0未审核，1审核通过，2审核不通过
     */
    @NotNull(message = "审核状态")
    private Integer isAudit;

    /**
     * 审核原因
     */
    private String isAuditDesc;

    public CompanyApply convertToCompanyApply() {
        CompanyApply companyApply = new CompanyApply();
        companyApply.setId(this.getId());
        companyApply.setIsAudit(this.getIsAudit());
        companyApply.setIsAuditDesc(this.getIsAuditDesc());
        companyApply.setGmtModifiedId(super.getOperateUserId());
        return companyApply;
    }
}
